<?php

class MY_Controller extends CI_Controller {
    protected $_data;
    public function __construct() {
        parent::__construct();
        $this->_data = array(
            'template'  =>  'template/layout',
            'data' =>  '',
            'load_page' =>  '',
            'controller'    =>  '',
            'action'    =>  ''
        );
    }
    public function getPagination($total_pages, $url) {
        $this->load->library('pagination');
        
        $config['base_url'] = $url;
        $config['total_rows'] = $total_pages;
        $config['per_page'] = 10;

        $this->pagination->initialize($config);
        return $this->pagination->create_links();
    }
}